//partial/list.php | view.php
function addClass_slider($slider,$value){
	$color = "";
	if($value <= 100 && $value >= 80)
		$color = '#82BA00';
	if($value < 80 && $value >= 60 )
		$color = '#008299';
	if($value < 60 && $value >= 50)
		$color = '#AC193D';
	if($value < 50 && $value >= 30)
		$color = '#FF8F32';
	if($value < 30)
		$color = '#F00';
	$slider.find('.ui-slider-range').css('background-color',$color);
	$slider.find('.ui-slider-handle').css('border-color',$color);
}

//partial/list.php
function for_slider(){
	$sliders = $('.slider');
	$('.slider').slider({slide:function(){return false;}});

	for($i = 0; $i < $sliders.length;$i++){
		$value = $('.slider').eq($i).attr('per');
		
		$('.slider').eq($i).slider({
		range: "min",
		value:$value
		});
		
		addClass_slider($sliders.eq($i),$value);//xu ly khung nhin slider
	}
}
$().ready(function(){
	if($('.chosen').length>0){
		$('.chosen').chosen();
	}
});